// layout相关配置仓库
import { defineStore } from 'pinia'
import { RouteRecordRaw } from "vue-router";

const useRouterStore = defineStore('Router', {
  state: () => {
    return {
      //保存获取的路由数据
      menuRoutes: [] as RouteRecordRaw[],
      //是否获取路由信息表标识
      hasRoute : false as boolean
    }
  },
  getters: {},
  actions: {
    changeRoute(route: boolean): void {
      this.hasRoute = route
    },
    setRouters(routers: RouteRecordRaw[]): void {
      this.menuRoutes = routers
    }
  }
})

export default useRouterStore
